package J11_9.J11_8.book;

public class BookList {
    private final int MAX_BOOKCOUNT = 9;
    private Book[] books;
    public BookList(){
        books = new Book[MAX_BOOKCOUNT];
        books[0] = new Book("三国演义","罗贯中",10,"小说");
        books[1] = new Book("西游记","施耐庵",10,"小说");
        books[2] = new Book("红楼梦","曹雪芹",10,"小说");
    }
    int bookCount = 3;

    public int getMAX_BOOKCOUNT() {
        return MAX_BOOKCOUNT;
    }

    public Book getBooks(int i ) {
        return books[i];
    }

    public int getBookCount() {
        return bookCount;
    }

    public void setBookCount(int bookCount) {
        this.bookCount = bookCount;
    }

    public void setBooks(int pos, Book book){
        books[pos] = book;
    }
}
